﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLBH.Model.Controller;
using QLBH.DataModel;
using QLBH.ModelInterface;

namespace QLBH.Category.Presenter
{
    public class QLNhomHangPresenter
    {
        public QLNhomHangPresenter()
        {

        }
        public List<IQLNhomHangModel> LoadDSNhomHang()
        {
            List<IQLNhomHangModel> results=new List<IQLNhomHangModel>();
            var items = NhomHangController.GetInstance().GetAll();
            foreach (LOAIHANG en in items)
            {
                var model = ModelFactory.ModelFactory.GetQLNhomHangModelInstance();
                model.InitFromEntity(en);

                results.Add(model);
            }
            return results;
        }
    }
}
